package com.class03._extends;

/**
 * @ClassDescription:
 * @JdkVersion: 17
 * @Author: yxy
 * @Created: 2024/4/2 11:10
 */
public class Person {
    //    属性
    String name;
    int age;

    //    方法
    public void eat() {
        System.out.println("吃饭");
    }
    public void sleep() {
        System.out.println("睡觉");
    }
    public void show() {
        System.out.println("姓名：" + name + "，年龄：" + age);
    }
    public int getAge(){
        return age;
    }
    public void setAge(int age){
        this.age = age;
    }

}
